import request from '@/utils/request'

//添加課程信息
export function addCourseInfo(courseInfo) {
    return request({
            url:'/eduservice/course/addCourseInfo',
            method: 'post',
            data: courseInfo
    })
}

//查詢所有老師
export function getAllTeacher() {
    return request({
            url:'/eduservice/teacher/findAll',
            method: 'get'
    })
}

//查詢课程ID信息
export function getCourseInfoId(courseId) {
    return request({
            url:`/eduservice/course/getCourseInfo/${courseId}`,
            method: 'get'
    })
}

//修改课程信息
export function updateCourseInfo(courseInfo) {
    return request({
            url:`/eduservice/course/updateCourseInfo`,
            method: 'post',
            data: courseInfo
    })
}

//确认课程信息展示
export function getPublishCourseInfo(id) {
    return request({
            url:`/eduservice/course/getPublishCourseInfo/${id}`,
            method: 'get'
    })
}

//最总发布
export function publishCourse(id) {
    return request({
            url:`/eduservice/course/publishCourse/${id}`,
            method: 'get'
    })
}

//查询课程list
export function getCourseList(current,limit,courseQuery) {
    return request({
            url:`/eduservice/course/${current}/${limit}`,
            method: 'post',
            data: courseQuery
    })
}

//删除课程
export function deleteCourse(courseId) {
    return request({
            url:`/eduservice/course/${courseId}`,
            method: 'delete'
    })
}

